home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2931 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: swap high and low 16 bits?
  5. Date: Wed, 24 Jan 96 20:42:09 GMT
  6. Organization: none
  7. Message-ID: <822516129snz@genesis.demon.co.uk>
  8. References: <Pine.OSF.3.91.960115174921.19742A-100000@io.UWinnipeg.ca> <ALUN.CHAMPION.96Jan16110016@g7240065.bridge.bst.bls.com> <Pine.OSF.3.91.960117143539.1414A-100000@io.UWinnipeg.ca> <821927899snz@genesis.demon.co.uk> <4dpkde$h3n@ns.RezoNet.NET>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4dpkde$h3n@ns.RezoNet.NET> ray@ultimate-tech.com "Ray Dunn" writes:
  15.  
  16. >>Just changing high order bits may not be a good idea since with some 
  17. >>RNGs this won't filter down to the lower order bits. I suggest you use 
  18. >>one of the expressions I posted earlier (which are incidentally 
  19. >>simpler than a full swap).
  20. >
  21. >Now that I see the original poster was in fact using time to seed the 
  22. >random number generator, I'm not quite sure what the problem is.  The 
  23. >closesness of one seed to another seed in no way implies that the two 
  24. >random sequences so produced will be "close to" each other.
  25.  
  26. Of course it depends on the actual RNG. However they may well be close
  27. over the first few values in each sequence.
  28.  
  29. -- 
  30. -----------------------------------------
  31. Lawrence Kirby | fred@genesis.demon.co.uk
  32. Wilts, England | 70734.126@compuserve.com
  33. -----------------------------------------
  34.